import cv2

video_path = r"C:\Users\jxy14\Desktop\Video_20210328235839.wmv"
capture = cv2.VideoCapture(video_path)
cnt = 0
while 1:
    ret, frame = capture.read()
    cv2.imshow("results", frame)
    tmp = '00000' + str(cnt)
    cv2.imwrite('HCIE_CLOUD_/' + tmp[-5:] + '.jpg', frame)
    cnt += 1
    c = cv2.waitKey(5) & 0xff
    if c == 27:
        cv2.destroyAllWindows()
        capture.release()
        break
